package com.ctshk.rpc.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.goods.entity.ShoppingCommoditySpecifications;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商城商品规格 Mapper 接口
 * </p>
 *
 * @author 姜斌文
 * @since 2021-04-13
 */
public interface ShoppingCommoditySpecificationsMapper extends BaseMapper<ShoppingCommoditySpecifications> {

	@Select("SELECT t.id,t.specifications_name_id,t.specifications,t.gmt_create,t.create_id,t.gmt_modified,t.modified_id,t.is_deleted "
			+ "FROM `ctshk-goods`.t_shopping_commodity_specifications t "
			+ "WHERE  t.is_deleted = 0 AND t.specifications_name_id = #{specificationsNameId}")
	List<ShoppingCommoditySpecifications> findSpecificationsByNameId(@Param("specificationsNameId")Long specificationsNameId);


	// =============================== H5端 Start ===============================
	@Select("SELECT t.id,t.specifications_name_id,t.specifications,t.gmt_create,t.create_id,t.gmt_modified,t.modified_id,t.is_deleted "
			+ "FROM `ctshk-goods`.t_shopping_commodity_specifications t "
			+ "WHERE  t.is_deleted = 0 AND t.specifications_name_id = #{specificationsNameId}")
	List<ShoppingCommoditySpecifications> findHtmlFiveSpecificationsByNameId(@Param("specificationsNameId")Long specificationsNameId);
	// =============================== H5端 End ===============================
}
